<include file="Public:head"/>
<div class="content" style="width:920px; background:none; margin-left:275px; border:none; margin-bottom:30px;" >
<div class="cLineB">
  <h4 class="left"><span class="FAQ">请勾选你要开启的功能</span></h4>
 </div>
<div class="msgWrap">
 <volist name="fun" id="vo">
 <fieldset>
	<legend>
		<span class="vipimgbig vip-iconbig{Lanrain:$key-1}"></span>可以使用的功能
	</legend>
	<ul class="changeapp">
	<volist name="vo" id="list" key="b">
	  <li>
		  <label> 
			<input  type="checkbox" <if condition="in_array($list['funname'],$check)">checked="checked"</if> <if condition="$list['gid'] gt session('gid')"> disabled="disabled" </if> onchange="changeapp(this,'{lanrain:$Think.session.token}','{lanrain:$list.id}')"  value="{lanrain:$list.id}"/> {lanrain:$list.name}
		  </label>
		  <div>查询例子:<br> {lanrain:$list.info}</div>
		</li>
	</volist>
	</ul>   
   </fieldset>
</volist>
</div>
<div class="clr"></div>
</div>
<script>
function changeapp(obj,token,id){
if(obj.checked==true){
   
var myurl='index.php?g=User&m=Token_open&a=add&token='+token+'&id='+id+'&r='+Math.random(); 
$.get(myurl,function(data){
	 if(data==1){
		alert('该功能已经成功添加');
	}
});
}else{
  
var myurl='index.php?g=User&m=Token_open&a=del&token='+token+'&id='+id+'&r='+Math.random(); 
$.get(myurl,function(data){
 if(data==1){
		alert('已经取消该功能');
	}
});
}
}
</script>
<div class="clr"></div>
<include file="Public:footer"/> 